from sklearn.naive_bayes import GaussianNB
from sklearn import datasets

iris = datasets.load_iris()
gnb = GaussianNB()
haty = gnb.fit(iris.data, iris.target).predict(iris.data)
print('correct: ', sum(haty == iris.target), '/', len(iris.data))

# output: correct:  144 / 150
